package com.cyh.ebptpubjar.astask.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cyh.ebptpubjar.astask.entity.AsTaskEntity;
import com.cyh.ebptpubjar.astask.dao.AsTaskDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;

/**
* AsTaskController
* 
* @author  cyh
* @version v0.0.1
* 描述：自动生成的代码
* 时间：2022-01-15 11:26:36
*/

@Component
public class AsTaskController{

    @Autowired
    private AsTaskDao asTaskDao;

    /**
    * 新增 
    * @param entity
    * @return
    */
    public int insert(AsTaskEntity entity){
        return asTaskDao.insert(entity);
    }

    /**
    * 批量新增 
    * @param entitys
    * @return
    */
    public int insertBatch(List<AsTaskEntity> entitys){
        return asTaskDao.insertBatch(entitys);
    }

    /**
    * 编辑(根据主键) 
    * @param entity
    * @return
    */
    public int updateByKey(AsTaskEntity entity){
        return asTaskDao.updateByKey(entity);
    }
    /**
    * 删除(根据主键) 
    * @param entity
    * @return
    */
    public int deleteByKey(AsTaskEntity entity){
        return asTaskDao.deleteByKey(entity);
    }

    /**
    * 批量删除 
    * @param entitys
    * @return
    */
    public int deleteBatchByCondition(List<AsTaskEntity> entitys){
        return asTaskDao.deleteBatchByCondition(entitys);
    }
    /**
    * 删除(自定义) 
    * @param entity
    * @return
    */
    public int deleteByCondition(AsTaskEntity entity){
        return asTaskDao.deleteByCondition(entity);
    }
    /**
    * 查询 
    * @param entity
    * @return
    */
    public AsTaskEntity getByKey(AsTaskEntity entity){
        return asTaskDao.getByKey(entity);
    }

    /**
    * 分页查询 
    * @param page,entity
    * @return
    */
    public List<AsTaskEntity> getByCondition(IPage<?> page, AsTaskEntity entity){
        return asTaskDao.getByCondition(page,entity);
    }

    /**
    * 批量分页查询 
    * @param page,entitys
    * @return
    */
    public List<AsTaskEntity> getBatchByCondition(IPage<?> page, List<AsTaskEntity> entitys){
        return asTaskDao.getBatchByCondition(page,entitys);
    }

    /**
    * 按照条件查询总数 
    * @param entity
    * @return
    */
    public int selectCountByCondition(AsTaskEntity entity){
        return asTaskDao.selectCountByCondition(entity);
    }
}